import ECharts from 'vue-echarts'
import { use } from 'echarts/core'
import { SVGRenderer } from 'echarts/renderers'
import { BarChart, PieChart } from 'echarts/charts'
import {
  GridComponent,
  TitleComponent,
  TooltipComponent,
  LegendComponent,
  DatasetComponent
} from 'echarts/components'

use([
  TitleComponent,
  TooltipComponent,
  LegendComponent,
  SVGRenderer,
  DatasetComponent,
  BarChart,
  PieChart,
  GridComponent
])
export default {
  install (vue) {
    vue.component('v-chart', ECharts)
  }
}
